<template>
  <div class="box">
    <div class="box2">
      <div class="box1">
        <p class="phone">{{number}}</p>
        <p class="hujiao" @click="callUp(number)">呼叫</p>
      </div>
      <div class="kong"></div>
      <p @click="goPhoneCallBack">取消</p>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      number: null
    };
  },
  methods: {
    callUp(number) {
      wx.makePhoneCall({
        phoneNumber: number //仅为示例，并非真实的电话号码
      });
    },
    goPhoneCallBack() {
      wx.navigateBack({
        delta: 1 //返回的页面数，如果 delta 大于现有页面数，则返回到首页,
      });
    }
  },

  onLoad: function(options) {
    console.log("33333333333");
    this.number = options.number;
  },
  created() {
    // let app = getApp()
  }
};
</script>

<style scoped>
.box {
  width: 100%;
  height: 100%;
  background-color: #ddd;
  /* opacity: 0.5; */
}
.box2 {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 189px;
}

.box1 {
  position: absolute;
  left: 0;
  top: 0;
  background-color: white;
  border-radius: 15px 15px 0 0;
  width: 100%;
  height: 125px;
}

.phone {
  height: 62px;
  line-height: 62px;
  text-align: center;
  font-size: 16px;
  font-family: Source Han Sans CN;
  font-weight: 400;
  border-bottom: 1px solid #ddd;
  color: rgba(163, 165, 168, 1);
}

.hujiao {
  height: 62px;
  line-height: 62px;
  text-align: center;
  font-size: 16px;
  font-family: Source Han Sans CN;
  font-weight: 500;
  color: rgba(51, 51, 51, 1);
}

.kong {
  position: absolute;
  top: 125px;
  width: 100%;
  height: 9px;
  background: rgba(245, 245, 245, 1);
}

.box2 > p {
  position: absolute;
  top: 134px;
  width: 100%;
  height: 55px;
  line-height: 55px;
  text-align: center;
  background-color: white;
  font-size: 16px;
  font-family: Source Han Sans CN;
  font-weight: 500;
  color: rgba(51, 51, 51, 1);
}
</style>
